<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>后台管理系统</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="Access-Control-Allow-Origin" content="*">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<script src="../admin/jquery-3.3.1/jquery-3.3.1.min.js"></script>
	<script src="../admin/jquery-3.3.1/jquery-3.3.1.js"></script>
	<link rel="stylesheet" href="layui/css/layui.css" media="all" />
	<!--<link rel="stylesheet" href="../../css/font_eolqem241z66flxr.css" media="all" />-->
	<link rel="stylesheet" href="css/main.css" media="all" />
	<script type="text/javascript" src="../tool/ajax.js"></script>
	<script src="../layer/layer-v3.1.1/layer/layer.js"></script>
	<link rel="stylesheet" href="../layer/layer-v3.1.1/layer/theme/default/layer.css">
	<script>
		
//        $(document).ready(function(){
//            try
//            {
//
//                ajaxget("admin/userloginToken",localStorage.getItem("jwt"),function (data) {
//                    if (data.val==200)
//                    {
//                        layer.msg('登陆成功', {
//                            icon: 1,
//                            time: 2000 //2秒关闭（如果不配置，默认是3秒）
//                        }, function(){
//                        });
//                    }
//                    else
//                    {
//                        layer.msg('登陆令牌失效,无法查询数据');
//                        window.location.href = "./login.html"
//                    }
//                })
//
//            }catch (e)
//            {
//                layer.msg('登陆令牌失效,无法查询数据');
//                window.location.href = "./login.html"
//            }
//        })
	</script>
</head>
<body class="main_body">
	<div class="layui-layout layui-layout-admin">
		<!-- 顶部 -->
		<div class="layui-header header">
			<div class="layui-main">
				<a href="#" class="logo">后台管理系统</a>

			    <ul class="layui-nav top_menu">
			    	<li class="layui-nav-item showNotice" id="showNotice" pc>

					</li>
			    	<li class="layui-nav-item" mobile>
			    		<a href="javascript:;" data-url="page/user/changePwd.html"><i class="iconfont icon-shezhi1" data-icon="icon-shezhi1"></i><cite>设置</cite></a>
			    	</li>
			    	<li class="layui-nav-item" mobile>
			    		<a href="javascript:;"><i class="iconfont icon-loginout"></i> 退出</a>
			    	</li>
					<li class="layui-nav-item lockcms" pc>
						<!--<a href="javascript:;"><i class="iconfont icon-lock1"></i><cite>锁屏</cite></a>-->
					</li>
					<li class="layui-nav-item" pc>
						<a href="javascript:;">
							<img src="images/touxiang.jpeg" class="layui-circle" width="35" height="35">
							<cite id="sysname"></cite>
						</a>
						<dl class="layui-nav-child">
							<!--<dd><a href="javascript:;" data-url="page/user/userInfo.html"><i class="iconfont icon-zhanghu" data-icon="icon-zhanghu"></i><cite>个人资料</cite></a></dd>-->
							<dd><a href="javascript:;" data-url="page/sysuser/changePwd.html"><i class="iconfont icon-shezhi1" data-icon="icon-shezhi1"></i><cite>修改密码</cite></a></dd>
							<dd><a href="login.html"><i class="iconfont icon-loginout"></i><cite>退出</cite></a></dd>
						</dl>
					</li>
				</ul>
			</div>
		</div>
		<!-- 左侧导航 -->
		<div class="layui-side layui-bg-black">
			<div class="user-photo">
				<a class="img" title="我的头像" ><img src="images/touxiang.jpeg"></a>
				<p>你好！<span class="userName"></span>, 欢迎使用</p>
			</div>
			<div class="navBar layui-side-scroll"></div>
		</div>
		<!-- 右侧内容 -->
		<div class="layui-body layui-form">
			<div class="layui-tab marg0" lay-filter="bodyTab">
				<ul class="layui-tab-title top_tab">
					<li class="layui-this" lay-id=""><i class="iconfont icon-computer"></i> <cite>后台首页</cite></li>
				</ul>
				<div class="layui-tab-content clildFrame">
					<div class="layui-tab-item layui-show">
						<iframe src="page/userlist/userList.html"></iframe>
					</div>
				</div>
			</div>
		</div>

	</div>


	<div class="site-tree-mobile layui-hide"><i class="layui-icon">&#xe602;</i></div>
	<div class="site-mobile-shade"></div>

	<script type="text/javascript" src="layui/layui.js"></script>
	<script type="text/javascript" src="js/nav.js"></script>
	<script type="text/javascript" src="js/leftNav.js"></script>
	<script type="text/javascript" src="js/index.js"></script>
</body>
<script>
	window.onload=function (ev) {
        var token=getCookieValue("token")


		if(token==null||token==""){
            layer.msg('会话失效，请重新登入！', {
                icon: 1,
                time: 3000 //2秒关闭（如果不配置，默认是3秒）
            }, function () {

                window.location.href = "./login.html"
            });

		}

		    var strArr=new Array();
			strArr=b64DecodeUnicode(token).split(",")
		var sysname=strArr[0];
		$("#sysname").text(sysname)



	}


    function getCookieValue(name) {

        var strCookie=document.cookie;

        var arrCookie=strCookie.split(";");

        for(var i=0;i<arrCookie.length;i++){

            var c=arrCookie[0].split("=");

            if(c[0]==name){

                return c[1];

            }

        }

        return "";

    }


    function b64EncodeUnicode(str) {
        return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
            return String.fromCharCode('0x' + p1);
        }));
    }

    function b64DecodeUnicode(str) {
        return decodeURIComponent(atob(str).split('').map(function(c) {
            return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
        }).join(''));
    }


</script>
</html>